home *** CD-ROM | disk | FTP | other *** search
- Program DemoParser;
-
- { Purpose....... Demonstrates the use of the following units: parser
- Comments...... None
- Author........ Thayne Breetzke
- Date.......... 16 July 1994 }
-
- Uses
- Parser;
-
- Var
- Count : Byte;
-
- Begin
- Writeln;
- If ParamCount = 0 then
- Begin
- Writeln('Execute this program giving it the following parameters:');
- Writeln;
- Writeln('/W /M c:\command.com /f /b9600 "Hello John!" /G-')
- end
- else
- Begin
- Writeln('Params returns ',NumParams);
- Writeln('Param(1) returns ',Param(1));
- Writeln('Param(2) returns ',Param(2));
- Writeln('Switch L there? ',SwitchPos('L',TRUE) <> 0);
- Writeln('SwitchData(''F'',TRUE) returns ',SwitchData('f',TRUE));
- Writeln('SwitchData(''B'',TRUE) returns ',SwitchData('B',TRUE));
- Writeln('SwitchData(''G'',TRUE) returns ',SwitchData('G',TRUE));
- Writeln;
- Writeln('Parameters:');
- Writeln;
- For Count := 1 to NumParams do
- Writeln(Count:4,' ',Param(Count))
- end;
- Writeln
- end.